<script setup>
	import Footer from './components/Footer.vue';
</script>

<template>
	<div>
		<router-view />
		<Footer :routeNow="routeNow"
			v-if="routeNow == '/' || routeNow == '/main' || routeNow == '/withdraw_apply' || routeNow == '/interest' || routeNow == '/staking'" />
	</div>
</template>
<script>
	export default {
		data() {
			return {
				routeNow: ''
			};
		},
		watch: {
			// 监听路由对象中的变化
			'$route'(to, from) {
				// 当路由发生变化时执行的代码
				console.log('Route changed from', from.path, 'to', to.path);
				this.routeNow = to.path;
				// 你可以在这里根据路由变化执行相应的逻辑
			}
		},
		created() {
			this.routeNow = this.$router.options.history.location;
			console.log(this.routeNow)
		},
		methods: {},
	};
</script>
<style>
	@import url("./assets/css/font.css");
	@import url("./assets/css/style.css");
</style>